package guowenlong.golf.ui.dynamic.message;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import guowenlong.golf.R;

/**
 * des   : 描述
 * author: Administrator
 * email : guowenlong20000@gmail.com
 * time  : 2017年03月26日 上午 1:35.
 */

public class MessageGolfAdapter extends
    RecyclerView.Adapter<MessageGolfAdapter.ViewHolder> {

  private LayoutInflater mInflater;

  public MessageGolfAdapter(Context context) {
    mInflater = LayoutInflater.from(context);
  }

  public static class ViewHolder extends RecyclerView.ViewHolder {

    public ViewHolder(View arg0) {
      super(arg0);
    }
    ImageView mImg;
  }

  @Override
  public int getItemCount() {
    return 5;
  }

  /**
   * 创建ViewHolder
   */
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
    View view = mInflater.inflate(R.layout.item_dynamic_message_golf,
        viewGroup, false);
    ViewHolder viewHolder = new ViewHolder(view);
    viewHolder.mImg = (ImageView) view.findViewById(R.id.iv_item_message);
    return viewHolder;
  }

  /**
   * 设置值
   */
  @Override
  public void onBindViewHolder(final ViewHolder viewHolder, final int i) {
//    viewHolder.mImg.setImageResource(mDatas.get(i));
  }
}
